<template>
  <div>
      <div class="header">
          <span @click="$router.go(-1)">返回</span>
          <span>{{$route.meta.name}}</span>
            <span></span>
      </div>
  </div>
</template>

<script>
export default {
    data() {
        return {
             meta:null
        }
       
    },
    mounted(){
        this.meta = this.$route.meta.name
       console.log(this.$route.meta); 
    },
   watch: {
       meta: {
           deep: true,
           // immediate: true,
           handler(newVal, oldVal) {
                console.log(newVal)
           },
       },
   },

}
</script>

<style scoped>
     .header {
         width: 100vw;
         height: 50px;
         background: red;
         display: flex;
         justify-content: space-around;
         align-items: center;
     }
     
</style>